/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package certificate.view;

import certificate.view.panelAdmin.AdminStartPanel;
import certificate.view.panelAdmin.JpCourse;
import certificate.view.panelAdmin.RegisterPanel;
import java.awt.CardLayout;

/**
 *
 * @author nothing
 */
public class adminForm extends javax.swing.JFrame {
    private CardLayout card;

    /**
     * Creates new form adminForm
     */
    public adminForm() {
        initComponents();
        this.setResizable(false);
        this.setLocation(150,10);
        card = new CardLayout();
        jpContent.setLayout(card);
        //CardLayout card = (CardLayout) jpContent.getLayout();
        JpCourse c=new JpCourse();
        RegisterPanel r=new RegisterPanel();
        AdminStartPanel asp = new AdminStartPanel();
        jpContent.add(asp,"asp");
        jpContent.add(c,"c");
        jpContent.add(r,"r");
        
        
        
        
        
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        alignmentHighlighter1 = new org.jdesktop.swingx.decorator.AlignmentHighlighter();
        jXPanel1 = new org.jdesktop.swingx.JXPanel();
        btnRegister = new org.jdesktop.swingx.prompt.BuddyButton();
        btnSearch1 = new org.jdesktop.swingx.prompt.BuddyButton();
        btnSearch2 = new org.jdesktop.swingx.prompt.BuddyButton();
        btnSearch = new org.jdesktop.swingx.prompt.BuddyButton();
        btnSearch3 = new org.jdesktop.swingx.prompt.BuddyButton();
        jXLabel1 = new org.jdesktop.swingx.JXLabel();
        btnSearch4 = new org.jdesktop.swingx.prompt.BuddyButton();
        jpContent = new org.jdesktop.swingx.JXPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Administrator");
        setBackground(new java.awt.Color(255, 255, 255));

        jXPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jXPanel1.setPreferredSize(new java.awt.Dimension(900, 103));

        btnRegister.setBackground(new java.awt.Color(51, 255, 153));
        btnRegister.setBorder(new javax.swing.border.MatteBorder(null));
        btnRegister.setForeground(new java.awt.Color(0, 51, 51));
        btnRegister.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Add.png"))); // NOI18N
        btnRegister.setText("Magane Student");
        btnRegister.setActionCommand("Magane Student");
        btnRegister.setBorderPainted(true);
        btnRegister.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnRegister.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRegisterActionPerformed(evt);
            }
        });

        btnSearch1.setBackground(new java.awt.Color(153, 255, 204));
        btnSearch1.setBorder(new javax.swing.border.MatteBorder(null));
        btnSearch1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/personal.png"))); // NOI18N
        btnSearch1.setText("Magane Fee");
        btnSearch1.setToolTipText("");
        btnSearch1.setActionCommand("");

        btnSearch2.setBackground(new java.awt.Color(153, 255, 204));
        btnSearch2.setBorder(new javax.swing.border.MatteBorder(null));
        btnSearch2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Delete.png"))); // NOI18N
        btnSearch2.setText("Magane Employee");
        btnSearch2.setToolTipText("");

        btnSearch.setBackground(new java.awt.Color(153, 255, 204));
        btnSearch.setBorder(new javax.swing.border.MatteBorder(null));
        btnSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Exit.png"))); // NOI18N
        btnSearch.setText("Exit");
        btnSearch.setToolTipText("");
        btnSearch.setActionCommand("Delete");

        btnSearch3.setBackground(new java.awt.Color(153, 255, 204));
        btnSearch3.setBorder(new javax.swing.border.MatteBorder(null));
        btnSearch3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Modify.png"))); // NOI18N
        btnSearch3.setText("Manage Mark");
        btnSearch3.setToolTipText("");
        btnSearch3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSearch3ActionPerformed(evt);
            }
        });

        jXLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/logo_aptech.gif"))); // NOI18N

        btnSearch4.setBackground(new java.awt.Color(153, 255, 204));
        btnSearch4.setBorder(new javax.swing.border.MatteBorder(null));
        btnSearch4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icon/Delete.png"))); // NOI18N
        btnSearch4.setText("Magane Course");
        btnSearch4.setToolTipText("");

        javax.swing.GroupLayout jXPanel1Layout = new javax.swing.GroupLayout(jXPanel1);
        jXPanel1.setLayout(jXPanel1Layout);
        jXPanel1Layout.setHorizontalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel1Layout.createSequentialGroup()
                .addGap(3, 3, 3)
                .addComponent(btnRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSearch3, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnSearch4, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(52, 52, 52)
                .addComponent(jXLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23))
        );
        jXPanel1Layout.setVerticalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel1Layout.createSequentialGroup()
                .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jXLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btnRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch3, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btnSearch4, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(20, 20, 20))
        );

        jpContent.setPreferredSize(new java.awt.Dimension(900, 595));

        javax.swing.GroupLayout jpContentLayout = new javax.swing.GroupLayout(jpContent);
        jpContent.setLayout(jpContentLayout);
        jpContentLayout.setHorizontalGroup(
            jpContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jpContentLayout.setVerticalGroup(
            jpContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 595, Short.MAX_VALUE)
        );

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jXPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1110, Short.MAX_VALUE)
            .addComponent(jpContent, javax.swing.GroupLayout.DEFAULT_SIZE, 1110, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jXPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpContent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(33, 33, 33))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnRegisterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRegisterActionPerformed
        card.show(jpContent, "r");
    }//GEN-LAST:event_btnRegisterActionPerformed

    private void btnSearch3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearch3ActionPerformed
        card.show(jpContent, "c");
    }//GEN-LAST:event_btnSearch3ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(adminForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(adminForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(adminForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(adminForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new adminForm().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.jdesktop.swingx.decorator.AlignmentHighlighter alignmentHighlighter1;
    private org.jdesktop.swingx.prompt.BuddyButton btnRegister;
    private org.jdesktop.swingx.prompt.BuddyButton btnSearch;
    private org.jdesktop.swingx.prompt.BuddyButton btnSearch1;
    private org.jdesktop.swingx.prompt.BuddyButton btnSearch2;
    private org.jdesktop.swingx.prompt.BuddyButton btnSearch3;
    private org.jdesktop.swingx.prompt.BuddyButton btnSearch4;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private org.jdesktop.swingx.JXLabel jXLabel1;
    private org.jdesktop.swingx.JXPanel jXPanel1;
    private org.jdesktop.swingx.JXPanel jpContent;
    // End of variables declaration//GEN-END:variables
}
